const config=require('./sqlConfig');
const mysql=require('mysql');
let dbPool={
  pool:{},
  create(){
    this.pool=mysql.createPool({
      host:'localhost',
      port:'3306',
      user:'root',
      password:'mWXS19971222@.',
      database:'sequelize'
    });
  },
  connect(sql,arr,fn){
    this.pool.getConnection(function (err,connection) {
      connection.query(sql,arr,fn);
      connection.release();
    })
  }

}
dbPool.create();
module.exports=dbPool;